<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta charset="UTF-8">
        <title>switch</title>
    </head>
    <body>
        <div th:switch="${sex}">
            <p th:case="'woman'">男</p>
            <p th:case="'man'">女</p>
            <!-- *: case的默认的选项 -->
            <p th:case="*">未知</p>
        </div>
    </body>
</html>